package com.naizhuai.ui.task.adapter;

import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;

import com.naizhuai.R;

import java.util.List;

/**
 * @author：lichenxi
 * @date 2018/3/30 11
 * email：525603977@qq.com
 * Fighting
 */
public class InputTextAdapter extends RecyclerView.Adapter<InputTextAdapter.ViewHolder> {

    private List<String> mStringList;

    public void setStringList(List<String> stringList) {
        mStringList = stringList;
        notifyDataSetChanged();
    }

    @NonNull
    @Override
    public InputTextAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        View root = LayoutInflater.from(parent.getContext())
                .inflate(R.layout.task_item_explain, parent, false);
        return new ViewHolder(root);
    }

    @Override
    public void onBindViewHolder(@NonNull ViewHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        return 3;
    }

    static class ViewHolder extends RecyclerView.ViewHolder {
        EditText textDescribe;

        public ViewHolder(View itemView) {
            super(itemView);
            textDescribe = itemView.findViewById(R.id.textDescribe);
        }
    }
}
